/*
 *   Copyright © 2011-2015 Kinghood Group All Rights Reserved.
 *   未经本公司正式书面同意，其他任何个人、团体不得使用、复制、修改或发布本软件.
 *   版权所有深圳金雅福控股集团有限公司 www.jinyafu.com.
 */

package com.zhang.postgresql.common.model;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 000062064
 * @title: MybatisPlusConfig
 * @projectName custom_ms
 * @description: MybatisPlus配置
 * 官方文档：http://mp.baomidou.com
 * @date 2019/6/12 9:59
 */
@Configuration
public class MybatisPlusConfig{
    @Bean
    public MybatisPlusInterceptor paginationInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(DbType.MYSQL);
        interceptor.addInnerInterceptor(paginationInnerInterceptor);
        return interceptor;
    }
}
